---
import './TabGroup.css';
import UIString from '../UIString.astro';
import { getLanguageFromURL } from '../../util';

const currentPage = new URL(Astro.request.url).pathname;
const lang = getLanguageFromURL(currentPage);
const segments = currentPage.split('/');
---

<div class="TabGroup no-flex">
	<a href={`/${lang}/install/auto/`} class={segments.includes('auto') ? 'active' : ''}>
		<UIString key="install.autoTab" />
	</a>
	<a href={`/${lang}/install/manual/`} class={segments.includes('manual') ? 'active' : ''}>
		<UIString key="install.manualTab" />
	</a>
</div>
